<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="m" uri="http://localhost:8080/cxy" %>
<%@ include file="base.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>${project.projectName }</title>
		<link href="${basePath }/styles/style.css" rel="stylesheet" type="text/css" />
		<link href="${basePath }/scripts/tip/tipTip.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="${basePath}/scripts/jquery.js"></script>
		<script type="text/javascript" src="${basePath }/scripts/tip/tip.js"></script>
		<script type="text/javascript">
			$(document).ready(function(){
				$(".tip").tipTip();
			});
		</script>		
	</head>

	<body>
		<%@ include file="header.jsp"%>
		<%@ include file="secondary-bar.jsp"%>
		<%@ include file="sidebar.jsp"%>
		<div id="right">
			<div class="column">
				<h3 class="tabs_involved">
					<img src="images/milestone.png" />
					里程碑
				</h3>
				<hr />
				<c:forEach items="${project.milestoneSet}" var="m">
					<div class="module_content">
						<h4>
							<a href="${m.id }">${m.name }</a>
							<span class="date" class="cc" title="a">【${m.sendTime }】</span>
						</h4>
						<c:forEach items="${m.issuesSet }" var="i">
							<div class="issue_item">
								<span class="tiptip"><m:drawImg state="${i.state}"/></span>
								<a href="issues!get.jspx?issues.id=${i.id }">${i.title }</a>
								<span class="date">${i.createTime }</span>
							</div>
						</c:forEach>
					</div>
				</c:forEach>
				<div class="actions">
					<span class="new_task" > <a href="milestone!input.jspx?pid=${project.id }" class="tip"  title="添加里程碑"> 添加里程碑</a> </span>
				</div>
			</div>
			<div class="column">
				<h3 class="tabs_involved">
					<img src="images/task.png" />
					任务
				</h3>
				<hr />
				<div class="module_content">
					<c:forEach items="${project.issuesSet }" var="i">
						<c:if test="${i.type == 0}">
							<div class="issue_item">
							<span class="tiptip"><m:drawImg state="${i.state}"/></span>
								<a href="issues!get.jspx?issues.id=${i.id }">${i.title }</a>
								<span class="date">${i.createTime }</span>
							</div>
						</c:if>
					</c:forEach>
				</div>
				<div class="actions">
					<span class="new_task"> <a href="issues!input.jspx?pid=${project.id }&type=0" class="tip" title="创建任务"> 创建任务</a> </span>
				</div>
			</div>
			<div class="column">
				<h3 class="tabs_involved">
					<img src="images/bug.png" />
					错误
				</h3>
				<hr />
				<div class="module_content">
					<c:forEach items="${project.issuesSet }" var="i">
						<c:if test="${i.type == 2}">
							<div class="issue_item">
								<span class="tiptip"><m:drawImg state="${i.state}"/></span>
								<a href="issues!get.jspx?issues.id=${i.id }">${i.title }</a>
								<span class="date">${i.createTime }</span>
							</div>
						</c:if>
					</c:forEach>
				</div>
				<div class="actions">
					<span class="new_task"> <a href="issues!input.jspx?pid=${project.id }&type=2" class="tip"  title="报告错误">报告错误</a> </span>
				</div>
			</div>
			<div class="column">
				<h3 class="tabs_involved">
					<img src="images/idea.png" />
					想法
				</h3>
				<hr />
				<div class="module_content">
					<c:forEach items="${project.issuesSet }" var="i">
						<c:if test="${i.type == 1}">
							<div class="issue_item">
								<span class="tiptip"><m:drawImg state="${i.state}"/></span>
								<a href="issues!get.jspx?issues.id=${i.id }">${i.title }</a>
								<span class="date">${i.createTime }</span>
							</div>
						</c:if>
					</c:forEach>
				</div>
				<div class="actions">
					<span class="new_task"> <a href="issues!input.jspx?pid=${project.id }&type=1" class="tip"  title="添加想法">添加想法</a> </span>
				</div>
			</div>

			<div class="column">
				<h3 class="tabs_involved">
					<img src="images/doc.png" />
					文档
				</h3>
				<hr />
				<div class="module_content">
					<c:forEach items="${project.documentSet }" var="d">
						<div class="issue_item">
							<span class="tiptip"><img src="images/doc.png"/></span>
							<a href="document!edit.jspx?document.id=${d.id }">${d.title }</a>
							<span class="date">${d.createTime }</span>
						</div>
					</c:forEach>
				</div>
				<div class="actions">
					<span class="new_task"><a href="document!input.jspx?document.project.id=${project.id }"  class="tip"  title="新建文档">新建文档</a> </span>
				</div>
			</div>
			
			<div class="column">
				<h3 class="tabs_involved">
					<img src="images/icn_view_users.png" />
					项目组成员
				</h3>
				<hr />
				<div class="module_content">
					<c:forEach items="${project.userSet }" var="u">
						<div class="issue_item">
							<span class="tiptip"><img src="images/user.png"/></span>
							<a href="user!get.jspx?id=${u.id }">${u.userName }</a>
							<span class="date">${u.createTime }</span>
						</div>
					</c:forEach>
				</div>
				<div class="actions">
					<span class="new_task"><a href="project!edit.jspx?id=${project.id}"  class="tip"  title="修改项目组成员">修改项目组成员</a> </span>
				</div>
			</div>
		</div>
	</body>
</html>
